package net.csdn.business.discuss.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import net.csdn.business.discuss.api.model.entity.DiscussId;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

/**
 * @author likun
 * @date 2022/6/16 20:14
 */
public interface DiscussIdMapper extends BaseMapper<DiscussId> {
    @Insert("INSERT INTO discuss_id (source_id,source_type) VALUES (#{sourceId},#{sourceType}) on duplicate key update max_id = max_id + 1")
    int insertDiscussId(DiscussId discussId);
}
